package com.sinocare.common.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Patient implements Serializable {
    private static final long serialVersionUID = 5794296675232241218L;

    private Integer patientId;          //检测者ID
    private String patientCode;         //检测者编号
    private Integer userId;             //用户ID
    private String customerCode;        //客户编号、会员号
    private String storeCode;           //所属分店编号
    private String storeName;               //所属分店
    private String name;                //姓名
    private String phone;               //电话
    private Integer sex;                //性别
    private Integer age;                //年龄
    private String idCard;              //身份证号
    private Double weight;              //体重
    private Double height;              //身高

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone = "GMT+8")
    @TableField("create_time")//表示当前属性名对应的字段名
    private Date createTime;                                //创建时间

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone = "GMT+8")
    @TableField("update_time")//表示当前属性名对应的字段名
    private Date updateTime;                                //修改时间

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone = "GMT+8")
    @TableField("last_test_time")//表示当前属性名对应的字段名
    private Date lastTestTime;                              //最后检测时间

    private Integer countOfTest;                //检测次数
    private Integer status;                //状态



}
